home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 4 / MacMania 4.toast / / Sound / SoundEffects 0.9.2 / SoundEffects Developer’s Kit / Interfaces / ModA4Globals.h < prev    next >
Text File  |  1994-11-10  |  2KB  |  46 lines

  1. // =============================================================================
  2. // SOUNDEFFECTS MODULES A4 GLOBAL STORAGE - VERSION 1.0 - OCTOBER 1994
  3. // ©1994 Alberto Ricci <fricci@polito.it>
  4. // Many thanks to Alessandro Levi Montalcini
  5. // Don’t forget to send me any cool effect modules you create!
  6. // This text looks best in monaco 9 font, 4 spaces per tab, no wrapping
  7.  
  8. #ifndef _H_a4globals
  9. #define _H_a4globals
  10.  
  11. //==============================================================================
  12.  
  13.     #if defined(powerc) || defined(__powerc) // powerpc
  14.     
  15.         #define MAIN_SETUP_GLOBALS(x)
  16.         #define MAIN_RESTORE_GLOBALS(x)
  17.         #define TEMP_SETUP_GLOBALS(x)
  18.         #define TEMP_RESTORE_GLOBALS(x)
  19.     
  20.     #elif defined(THINK_C) // think c
  21.     
  22.         #include <SetUpA4.h>
  23.         #define MAIN_SETUP_GLOBALS(x)    { RememberA0(); SetUpA4(); asm { MOVE.L (A7)+, x } }
  24.         #define MAIN_RESTORE_GLOBALS(x)    { asm { MOVE.L x, -(A7) } RestoreA4(); }
  25.         #define TEMP_SETUP_GLOBALS(x)    { SetUpA4(); asm { MOVE.L (A7)+, x } }
  26.         #define TEMP_RESTORE_GLOBALS(x)    { asm { MOVE.L x, -(A7) } RestoreA4(); }
  27.     
  28.     #elif defined(__MWERKS__) // code warrior
  29.     
  30.         #include <A4Stuff.h>
  31.         #include <SetUpA4.h>
  32.         #define MAIN_SETUP_GLOBALS(x)    { x = SetCurrentA4(); RememberA4(); }
  33.         #define MAIN_RESTORE_GLOBALS(x)    { (void)SetA4(x); }
  34.         #define TEMP_SETUP_GLOBALS(x)    { x = SetUpA4(); }
  35.         #define TEMP_RESTORE_GLOBALS(x)    { (void)RestoreA4(x); }
  36.     
  37.     #else // unknown compiler, stop here
  38.     
  39.         *** unsupported compiler ! ***
  40.     
  41.     #endif // end of compiler-specific stuff
  42.  
  43. //==============================================================================
  44.  
  45. #endif // _H_a4globals
  46.